package cn.com.cym.gamezao.enums;

import io.swagger.annotations.ApiModel;

/**
 * 数据库字段类型
 */
@ApiModel("字段类型枚举")
public enum ItemType {
    DATE("D","日期"),
    NUMBER("N","数字"),
    STRING("S","字符"),
    DICT("E","字典"),
    DATETIME("DT","时间");

    private String sign;

    private String value;

    private ItemType(String sign,String value){
        this.sign=sign;
        this.value=value;
    }

    public String getSign(){
        return this.sign;
    }

    public String getValue(){
        return this.value;
    }

    public  static  ItemType fromSign(String sign){
            for(ItemType itemType:ItemType.values()){
                if(itemType.getSign().equals(sign)){
                    return itemType;
                }
            }
            return  null;
    }

}
